package cn.iocoder.yudao.module.policy.controller.admin;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.policy.entity.InfoDO;
import cn.iocoder.yudao.module.policy.service.InfoService;
import cn.iocoder.yudao.module.policy.vo.info.InfoRespVO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.annotation.security.PermitAll;
import javax.validation.Valid;
import java.util.List;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

@Tag(name = "APP - 就业政策")
@RestController
@RequestMapping("/app/policy/info")
@Validated
public class AppInfoController {

    @Resource
    private InfoService infoService;


    @GetMapping("/list")
    @Operation(summary = "获得就业政策分页")
    @PermitAll
    public CommonResult<List<InfoDO>> getInfoList(@Valid InfoRespVO pageReqVO) {
        return success(infoService.getInfoList(pageReqVO));
    }


}